#!/usr/bin/env node

const readline=require('readline/promises');
const rl=readline.createInterface({input:process.stdin,output:process.stdout})//创建一个readline接口
const log=console.log

const msg=['name','email','qq','mobile'];

const me={}
async function main(){
    for(let num=0;num<msg.length;num++){
        const answer= await rl.question(msg[num]+': ');//这里等待用户输入回答
        me[msg[num]]=answer;
    }

    rl.close();//关闭输入流
    console.log(me)
}
main()
